<template>
  <div class="wrap">
    <header>
      <span @click="go()">&lt;</span>
      <p>章先生</p>
    </header>
    <main>
      <div class="zu2">
        <div class="box">
          <div class="box1">
            <div class="box11">
              <img :src="list.img" alt />
              <h4>用户名称</h4>
            </div>
            <span>上午9:00</span>
          </div>
          <div class="box2">
            <p>{{list.title}}</p>
            <p>{{list.fang}}</p>
          </div>
          <div class="box3">
            <label>意向区域:</label>
            <span>{{list.qu}}</span>
            <label>意向价格:</label>
            <span class="price">{{list.price}}:00/月</span>
          </div>
        </div>
      </div>
    </main>
    <footer>
      <!-- <img src="../../img/键盘.png" alt /> -->
    </footer>
  </div>
</template>


<script>
import axios from "../../utils/request";
export default {
  data() {
    return {
      list: []
    };
  },
  created() {
    this.getList();
  },
  methods: {
    go() {
      this.$router.go(-1);
    },
    getList() {
      axios({
        url: "/api/detail",
        method: "post",
        data: this.$route.params
      }).then(res => {
        // console.log(res);
        this.list = res.data.data;
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
header {
  width: 100%;
  height: 50px;
  display: flex;
  line-height: 50px;
  align-items: center;
  background: rgb(56, 121, 240);
  padding: 15px;
  color: #fff;
  p {
    padding-left: 38%;
  }
}
main {
  flex: 1;
  overflow-y: scroll;
  .zu2 {
    // margin-top: 50px;
    .box {
      padding: 10px;
      margin: 10px;
      .box1 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .box11 {
          display: flex;
          align-items: center;
          img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
          }
          h4 {
            font-size: 16px;
            padding-left: 15px;
          }
        }
        span {
          font-size: 14px;
        }
      }
      .box2 {
        display: flex;
        align-items: center;
        padding: 10px 0;
        font-size: 16px;
        p {
          padding-right: 35px;
        }
      }
      .box3 {
        display: flex;
        align-items: center;
        padding: 5px 0;
        label {
          font-size: 14px;
          color: #333;
          padding-right: 5px;
        }
        span {
          // padding: 0 5px;
          padding-right: 20px;
          font-size: 14px;
        }
        .price {
          color: orangered;
        }
        div {
          width: 25px;
          height: 25px;
          text-align: center;
          line-height: 25px;
          padding: 0 10px;
        }
        .van-icon:nth-of-type(1) {
          color: palevioletred;
        }
      }
    }
  }
}
footer{
  img{
    width: 100%;
    height: 300px;
  }
}
</style>